﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="PurchaseOrderUpdate.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.ProcureManage.PurchaseOrderUpdate"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="maincon">
        <div id="note">
            采购单信息
        </div>
        <div id="note2">
        </div>
        <table>
            <tr>
                <th>
                    <asp:Label ID="lblPurchaseOrderName" runat="server" Text="采购单名称："></asp:Label>
                </th>
                <td colspan="2" align="center">
                    <asp:Label runat="server" ID="lblPurseOrder"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblAmount" runat="server" Text="采购总金额："></asp:Label>
                </th>
                <td colspan="2">
                    <asp:Label ID="txtAmount" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lblHospital" runat="server" Text="采购医疗机构："></asp:Label>
                </th>
                <td colspan="2">
                    <asp:Label ID="txtHospital" runat="server"></asp:Label>
                </td>
                <th>
                    <asp:Label ID="lblPerson" runat="server" Text="制单人："></asp:Label>
                </th>
                <td colspan="2">
                    <asp:Label ID="txtPerson" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <asp:GridView ID="gvwPurchaseOrderDetail" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="ProcureCatalogID,CompanyID_PS,OrderDetailID" EmptyDataText="该医疗机构暂无可采购的产品！"
        OnRowDataBound="gvwPurchaseOrderDetail_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %>
                </ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="数量">
                <ItemTemplate>
                    <asp:TextBox ID="txtCount" runat="server" Width="50px" oncontextmenu="javascript:return false;"
                        onblur="javascript:return check_isnum();" onkeydown="javascript:return check_isnum();"
                        MaxLength="5" ToolTip="整数类型(格式如10)" Text='<%# Eval("PurchaseCount") %>'></asp:TextBox>
                    <asp:Label ID="lblCount" runat="server" Width="50px" Text='<%# Eval("PurchaseCount") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("Price")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <%--<asp:BoundField DataField="ProcurePrice" HeaderText="采购限价" DataFormatString="{0:N4}"/>--%>
            <asp:TemplateField HeaderText="采购限价">
                <ItemTemplate>
                    <asp:Label ID="lblProcurePrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("ProcurePrice")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Packcount" HeaderText="建议采购数量" />
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" />
            <asp:BoundField DataField="Material" HeaderText="材质" NullDisplayText="无" />
            <asp:BoundField DataField="Unit" HeaderText="最小计量单位" />
            <asp:BoundField DataField="PackUnit" HeaderText="包装单位" />
            <asp:BoundField DataField="QualityLevel" HeaderText="产品类别" />
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" />
            <asp:BoundField DataField="CompanyName_PS" HeaderText="配送企业" />
            <asp:BoundField DataField="orderdetailstatedc" HeaderText="配送状态" />
            <asp:TemplateField HeaderText="配送状态" Visible="false">
                <ItemTemplate>
                    <asp:Literal runat="server" ID="ltlOrderDetailState" Text='<%# Eval("OrderDetailState") %>'></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this, 'ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail', 'addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="checkbox1" id="checkbox1" value='<%#Eval("OrderDetailID")%>'
                        onclick="chkChecked(this, 'ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail', 'addTable_chkAll');"
                        runat="server" />
                </ItemTemplate>
                <HeaderStyle Width="25px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>说明：<span>先选中需要操作的明细，然后再进行相应的操作；复选框不能选择的说明不能进行此操作。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="添加产品" CssClass="btn" OnClick="btnAdd_Click"
            OperateType="编辑" />
        <hz:HzButton ID="btnModCnt" runat="server" Text="保存修改" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail','请至少选定一个采购明细！')) {return confirm('确实要更改选定的采购明细？');}return false;"
            CssClass="btn" OnClick="btnModCnt_Click" OperateType="编辑" />
        <hz:HzButton ID="btnDel" runat="server" Text="删除产品" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail','请至少选定一个采购明细！')) {return confirm('确实要删除选定的采购明细？');}return false;"
            CssClass="btn" OnClick="btnDel_Click" OperateType="删除" />
        <hz:HzButton ID="btnSubmit" runat="server" Text="提交给配送商" CssClass="btn" OnClientClick=" if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwPurchaseOrderDetail','请至少选定一个采购明细！')) {return confirm('确实要确认选定的采购明细？');}return false;"
            OnClick="btnSubmit_Click" OperateType="提交" Width="90px" />
        <hz:HzButton ID="btnDelOrder" runat="server" CssClass="btn" OnClick="btnDelOrder_Click"
            Text="删除采购单" OnClientClick="return confirm('确定要删除这个采购单吗？')"
            ToolTip="将此采购单删除" OperateType="删除" />
        <hz:HzButton ID="btnExport" runat="server" Text="导出Excel" CssClass="btn" ToolTip="导出Excel"
            OnClick="btnExport_Click" />
    </div>
</asp:Content>
